﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using NerdDinnerWCFService;

namespace NerdDinnerWCFServiceHost
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceHost serviceHost = null;
            try
            {
                serviceHost = new ServiceHost(typeof(DinnerService));


                serviceHost.Open();
                Console.WriteLine("Welcome to the NerdDinnerWCFService. Press enter to stop.");
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                if (serviceHost != null) serviceHost.Close();
            }
        }
    }
}
